import type { DescriptionsProps } from 'antd';
import { Descriptions } from 'antd';
import React from 'react';

const App: React.FC = ({
  caseType = '危险驾驶',
  time = '2022-10-31',
  company = '佛山市和顺中队',
  city = '暂无',
  area = '暂无',
  address = '暂无',
  reason = '暂无',
}: any) => {
  const items: DescriptionsProps['items'] = [
    {
      key: '1',
      label: '案件类别',
      children: caseType,
    },
    {
      key: '2',
      label: '案件时间',
      children: time,
    },
    {
      key: '3',
      label: '所属单位',
      children: company,
    },
    {
      key: '4',
      label: '所在市',
      children: city,
    },
    {
      key: '5',
      label: '所在区',
      children: area,
    },
    {
      key: '6',
      label: '所在地址',
      children: address,
    },
    {
      key: '7',
      label: '原因概述',
      children: reason,
    },
  ];

  return <Descriptions items={items} />;
};

export default App;
